
#include "inversionargument.h"



// extern "C"  float** deepinsightCall(float lat, float lon, float alt, float obsAlt,
//                                    int aerosolType, long long time,
//                                    int photometerDX, int photometerDY, long* photometerTimes, float** photometerDatas,
//                                    int lidarDX, int lidarDY, float** lidarDatas,
//                                    float visibility, float pressure, float tem, float rh, float ws, float wd,
//                                    int trackDX, long* trackTimes, float* trackAzims, float* trackElevations, float* trackRanges,
//                                    char* backgroundDataDir, char* tmpDir, float** deepinsight);

/*
InversionArgument::InversionArgument()
{
    connect(GlobalObserver::getInstance(), &GlobalObserver::Sig_VisibilityProtocol, this, [=](protocol::VisibilityProtocol protocol){
        m_visibility = protocol.m_one_minute_visibility;
        m_visibilityFlag = true;
    });

    connect(GlobalObserver::getInstance(), &GlobalObserver::Sig_GroundWeatherStationProtocol, this, [=](protocol::GroundWeatherStationProtocol protocol){
        m_pressure = protocol.m_pressure;
        m_temperature = protocol.m_temperature;
        m_humidity = protocol.m_humidity;
        m_windSpeed = protocol.m_one_minute_maxWindSpeed;
        m_windDirection = protocol.m_one_minute_windDirection;
        m_groundWeatherStationFlag = true;
    });

    connect(GlobalObserver::getInstance(), &GlobalObserver::Sig_SolarRadioMeterProtocolSTA, this, [=](const protocol::RadioMeterSTAProtocolAll& protocol){
        QDateTime midnight = QDateTime(protocol.dateTime.date(), QTime(0, 0, 0));
        long trackTime = protocol.dateTime.msecsTo(midnight);

        m_trackTimes.push_back(trackTime);
        m_trackAzims.push_back(protocol.azimuthAngle);
        m_trackEleveations.push_back(protocol.heightAngle);
    });

    connect(GlobalObserver::getInstance(), &GlobalObserver::Sig_SolarRadioMeterProtocolNSU, this, [=](const protocol::RadioMeterNSUProtocolAll& protocol){

    });
}*/

void InversionArgument::deepinSightCall()
{

    // float** datas = deepinsightCall(m_lat, m_lon, //经度和纬度
    //                                 m_alt, m_obsAlt, //海拔和设备高度
    //                                 m_aerosolType, m_beginTime, //类型和开始计算时间
    //                                 m_solorRadioMeterDX, m_solorRadioMeterDY, m_solorRadioMeterTimes.data(), m_solorRadioMeterDatas.data(), 	// 太阳辐射计数据格式，需要给出当日所有观测记录,第一个为x 第二个为y，第三个为长度为y的long的时间数组，第四个为y行x列的float数组
    //                                 m_lidarDX, m_lidarDY, m_lidarDatas.data(),		// 激光雷达数据 其中，DX = 2，DX = 0，对应为激光雷达的高度，DX = 1对应为对应高度的消光系数， 高度为从观测点地面开始向上，为从小到大递增
    //                                 //此数组为一段时间后的平均，一段时间，可以做为软件的一个可选参数调节平均的时间长度。
    //                                 m_visibility, m_pressure, m_temperature, m_humidity, m_windSpeed, m_windDirection, // 能见度仪器和气象站
    //                                 m_trackDX, m_trackTimes.data(), m_trackAzims.data(), m_trackEleveations.data(), m_trackRanges.data(),	//  长度，轨迹文件的时间、方位角、高度角、距离
    //                                 m_backgroundDataDir, m_tempDir, m_deepinsght); //大气背景场数据存放目录，临时目录，输出结果

}


